function z = genmat(x)
% convert the social network summary into a matrix of with appropriate
% delta-c values z
% x is the given array
z = zeros(20, 20);
for k = 1:size(x, 1),
    i = round(x(k,5)/0.05)+1;
    j = round(x(k,6)/0.05)+1;
    [v, t] = max(x(k,11:20));
    if (t == 2) t = 3;
    elseif (t == 3) t = 5;
    elseif (t == 4) t = 7;
    elseif (t == 5) t = 2;
    elseif (t == 6) t = 4;
    elseif (t == 7) t = 6;
    end
    % New map -                   old map
    % 1 - null                    null  
    % 2 - near-null               star
    % 3 - star                    shared
    % 4 - near-star               complete
    % 5 - shared                  near-null
    % 6 - near-shared             near-star
    % 7 - complete                near-shared
    % 8 - near-complete           near-complete
    % 9 - k-partite               k-partite
    % 10 - complete k-partite     complete k-partite


    z(j, i) = t;
end
diary on
z
diary off
